import axios from '@/libs/api.request'

// 添加会员卡
export const addCard = (data) => {
  return axios.request({
    url: '/admin/card/add',
    data,
    method: 'post'
  })
}

// 修改会员卡
export const updateCard = (data) => {
  return axios.request({
    url: '/admin/card/update',
    data,
    method: 'post'
  })
}

// 删除会员卡
export const deleteCard = (id) => {
  return axios.request({
    url: `/admin/card/delete/${id}`,
    method: 'get'
  })
}

// 会员卡列表
export const cardList = (data) => {
  return axios.request({
    url: '/admin/card/findAll',
    data,
    method: 'post'
  })
}
